package com.leyou.user.dto;

import com.leyou.common.utils.constants.RegexPatterns;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import sun.misc.RegexpTarget;

import javax.validation.constraints.Pattern;

/**
 * @author xiuer
 * @description
 * @create 2019/7/7 15:10
 */
@Data
public class UserDTO {
    @Pattern(regexp = RegexPatterns.USERNAME_REGEX, message = "用户名格式不正确！！！")
    private String username;
    @Length(min = 4, max = 30, message = "密码格式不正确！！！")
    private String password;
    @Pattern(regexp = RegexPatterns.PHONE_REGEX, message = "手机号格式不正确！！！")
    private String phone;
}
